#!/src/bin/perl -w
$filename = "corpus/amants.txt";
chomp($filename);
open (FileInput, $filename)||die "Can't open file";
open (FileOutput, '>moteneau.txt');

while ($line = <FileInput>) 
{
	@lines = split(/ /,$line);    
      foreach $mot (@lines)       
	  {       
        if ($mot =~ /eau/)
		{
			print FileOutput $line;
		}
	  }

}
close(FileOutput); 
close(FileInput);